<template>
  <div>
      <router-link :to="{name:'grade_post'}">添加</router-link>
      <table>
          <tr v-for="data in datas">
              <td>{{data.id}}</td>
              <td>
                  <router-link :to="{name:'student_get',query:{'grade_id':data.id}}">{{data.name}}</router-link>
              </td>
          </tr>
      </table>
  </div>
</template>

<script>
export default {
    name:'grade_get',
    data(){
        return{
            datas:[]
        }
    },
    methods:{
        getdata(){
            this.axios.get('asd/').then(res=>{
                this.datas=res.data
            })
        }
    },
    mounted(){
        this.getdata()
    }

}
</script>

<style>

</style>